package com.baifendian.common.task;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author peng.guo on 2018/3/5.
 */
public class SimulatedTask implements Runnable  {

  private String name;
  private final AtomicInteger seq = new AtomicInteger(0);

  public SimulatedTask(String name) {
//    this.maxConsumption = maxConsumption;
//    this.minConsumption = minConsumption;
    this.name = name;
  }

  @Override
  public void run() {
    try {
      Thread.sleep(1000);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    System.out.println(name + "" + seq.incrementAndGet());
  }

}
